@extends('layouts.default')  
@section('content')
<div class="box primary">        
    <header>
        <h5>{{Lang::get('messages.edit_roles')}}</h5>
        <!-- .toolbar -->
        <div class="toolbar">
            <nav style="padding: 8px;">
                <a href="javascript:;" class="btn btn-default btn-xs collapse-box">
                    <i class="fa fa-minus"></i>
                </a> 
                <a href="javascript:;" class="btn btn-default btn-xs full-box">
                    <i class="fa fa-expand"></i>
                </a> 
                <a href="javascript:;" class="btn btn-danger btn-xs close-box">
                    <i class="fa fa-times"></i>
                </a> 
            </nav>
        </div><!-- /.toolbar -->
    </header>
    <div id="div-1" class="body"> 
        @foreach ($values as $v) 
        {{ Form::model($v, array(
                        'route' => array('roles.update', $v->id),
                        'method' => 'PUT','class'=>'form-horizontal',
                        'id'=>'form-validate')) 
        }}
        <div class="form-group">
            {{ Form::label('username', Lang::get('login.username').'*', array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('username', isset($v->Username) ? $v->Username : '' , array(
                                'readonly'=>'',
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('email', Lang::get('login.email').'*', array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('email', isset($v->email) ? $v->email : '' , array(
                                'readonly'=>'',
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('first_name', Lang::get('login.first_name').'*', array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('first_name', isset($v->first_name) ? $v->first_name : '' , array(
                                'readonly'=>'',
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('last_name', Lang::get('login.last_name').'*', array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('first_name', isset($v->last_name) ? $v->last_name : '' , array(
                                'readonly'=>'',
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('role', Lang::get('messages.role'), array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">  
                {{ Form::select('role', array(
                                'admin' => Lang::get('messages.admin'),
                                'operator' => Lang::get('messages.operator')
                                ),isset($v->role) ? $v->role : '', array('class' => 'form-control')
                                )
                }}
            </div>
        </div>
        {{ Form::submit(Lang::get('messages.save_btn'), array('class' => 'btn btn-primary btn-line')) }}
        <input type="button" value="{{Lang::get('messages.cancel_btn')}}" class="btn btn-danger btn-line" onClick="history.go(-1);
                    return true;">
        {{ Form::close() }}
        @endforeach
    </div>
</div>   
@stop